package com.snimay.app.clazz.vo;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.snimay.heibernate.Annotation.field;
import com.snimay.heibernate.Annotation.table;
/**   
 * @Title      : Clazz.java
 * @Package    : com.snimay.app.clazz.vo
 * @Description: TODO 
 * @author     : xxy
 * @date       : 2018年5月2日 下午2:31:25
 * @version    : V1.0   
 */
@Entity
@Table(name = "SYS_Clazz")
@table(query = "name", name = "类型管理",size=10)
public class Clazz {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@field(text = "ID")
	public Long id;
	/**
	 * @Description: 类的名称 
	 * @author     : xxy
	 */
	@Column(name = "name_")
	@field(text = "名称")
	public String name; 
	/**
	 * @Description: 默认查询字段 
	 * @author     : xxy
	 */
	@Column(name = "query_")
	@field(text = "查询")
	public String query;
	/**
	 * @Description: 备注 
	 * @author     : xxy
	 */
	@Column(name = "remarks_")
	@field(text = "备注")
	public String remarks; 
	
	/**
	 * @Description: 服务 
	 * @author     : xxy
	 */
	@Column(name = "sever_")
	@field(text = "服务")
	public String sever;
    /**
     * @Description: 类的字段 
     * @author     : xxy
     */
    @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)  
	@JoinColumn(insertable=true,updatable=true,name="clazz")
    @field(text="字段",index=1)
    public Set<Field>	fields;
}
